import Vue from 'vue'

import Cookies from 'js-cookie'

import Element from 'element-ui'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
import '@/assets/font/iconfont.js'
import Icon from '@/components/icon/Icon'
import filters from '@/filters/index'
import echarts from 'echarts'
import preventReClick from '@/utils/preventReClick'

Vue.use(preventReClick);
Vue.prototype.$echarts = echarts
import './permission' // permission control

Vue.component('Icon', Icon)
for(let key in filters){
	Vue.filter(key,filters[key]);
}
Vue.prototype.$filter = filters;
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */

Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})